#pragma once

#ifndef _PARAMETERS_
#define _PARAMETERS_

#include<memory>

class TestInfoManager;
class GroupInfo;

class Parameters
{
private:
	static Parameters& GetInstance();
	Parameters(void);
	~Parameters(void);
	BOOL Load(const CString& pathSettingfile);
	BOOL Save(const CString& pathSettingfile);
	
private:
	CString m_pathCurrentDirectory;
	CString m_pathSettingfile;
	CString m_pathLayout;
	CString m_strLastError;
	TUserAction m_tUserAction;
	TOperationMode m_tOperationMode;
	
	CString m_pathLab100;
	CString m_pathWmplayer;
	CString m_pathECF;
	UINT m_uFontSize;
	UINT m_uDisplaySize;
	std::tr1::shared_ptr<TestInfoManager> m_pTestInfoManager;
	BOOL m_bInterlace;
	BOOL m_bStart_At_First_Line;
	__int64 MinimumFreeDisk;
	BOOL bDestinationRemovableDrive;
	CString m_strFlptAudioDestinationPrefix;
	BOOL bShowDeleteSourceError;
	BOOL bUseExternalConverter;
public:
	static const CString& GetLab100Path();
	static const CString& GetLayoutPath();
	static const CString& GetECF();
	static UINT GetFontSize();
	static UINT GetDisplaySize();
	static __int64 GetMinimumFreeDisk();
	static BOOL IsDestinationRemovableDrive();
	static UINT GetCurrentTestId();
	static BOOL SetCurrentTestId(UINT TestId);
	static CString GetTestDescription();
	static UINT GetTestSize();
	static CString GetTestDescription(UINT TestId);
	static const CString& GetCLF();
	static COLORREF GetBackGroundColor();
	static COLORREF GetAdditionalStudentBackGroundColor();
	static const CString& GetAudioSource();
	static const CString& GetAudioDestination(int nGroup);
	static BOOL SetCLF(const CString& clf);
	static BOOL SetAudioSource(const CString& audioSource);
	static GroupInfo* GetGroupInfo(UINT i);
	static size_t GetGroupSize();
	static GroupInfo* GetCurrentGroupInfo();
	static BOOL SetCurrentGroup(UINT i);
	static UINT GetCurrentGroup();
	static CString GetGroupDescription(int nGroup);
	static COLORREF GetTextColor(int nGroup);
	static COLORREF GetTextBackGroundColor(int tSeatState);
	static TUserAction GetUserAction();
	static void SetUserAction(TUserAction tUserAction);
	static void SetLastError(LPCTSTR lpszFormat, ...);
	static const CString& GetLastError();
	static BOOL IsInterlace();
	static void SetInterlace(BOOL bInterlace);
	static BOOL IsStart_At_First_Line();
	static void SetStart_At_First_Line(BOOL bStart_At_First_Line);
	static const CString& GetFlptAudioDestinationPrefix();
	static BOOL IsShowDeleteSourceError();
	static const CString& GetWmplayerPath();
	static TOperationMode GetOperationMode();
	static void SetOperationMode(TOperationMode tOperationMode);
	static BOOL IsUseExternalConverter();
};

#endif /* _PARAMETERS_*/